POV-Ray : Newsgroups : povray.general : Is this an example of Isosurface Image Noise Problem? : Is this an example of Isosurface Image Noise Problem? Server Time
2 Aug 2024 04:21:30 EDT (-0400)
  Is this an example of Isosurface Image Noise Problem?  
From: mephuser
Date: 23 Jan 2005 08:50:00
Message: <web.41f3aa55fa67b1433d54f5180@news.povray.org>
Is this an example of Isosurface Image Noise Problem?

Referring to this FAQ,
http://tag.povray.org/povQandT/languageQandT.html#isosurfacebug

I wonder if my Isosurface code below fits the above description.
I'm having sudden black lines here and there...
I would agree that using Predefined shape code would solve my entire
problem, however I'm required to render in Isosurface code, so no
shortcuts.

[Isosurface Code]

#include "colors.inc"
#include "functions.inc"

global_settings
{
  assumed_gamma 1.0
}

camera
{
  location  <0.0, .5, -4.5>
  direction 1.5*z
  right     4/3*x
  look_at   <0.0, 0.0, 0.0>
}

light_source
{
  0*x // light's position (translated below)
  color red 1.0  green 1.0  blue 1.0  // light's color
  translate <-30, 30, -30>
}

/*sky_sphere { pigment {
    function{abs(y)}
    color_map { [0.0 color blue 0.6] [1.0 color rgb 1] }
  }
} */

// ----------------------------------------

/* #declare R = 0.5;

isosurface {
  function { x*x + y*y + z*z - R*R }
        max_gradient 4.4
        //contained_by{sphere{0,1.2}}
        //interior{ior 1.5 dispersion 1.05}
        pigment {rgb .9}
        finish {phong 0.5 phong_size 10}
} */

//#declare C = 0.215;

/*isosurface {
function { -(0.215-pow(x,2)-pow(z,2)) }
        threshold 0
        accuracy 0.001
        max_gradient 4.4
        //contained_by{sphere{0,2}}
        pigment {White}
        finish {specular 1}
}  */

difference{
merge
{

// Cylinder Middle
isosurface {
  function { pow(x,2) + pow(z,2) - pow(0.215,2) }
        accuracy 0.001
        threshold 0
        max_gradient 4
        contained_by{box{<-1,-0.5,-1>, <1,0.5,1>}}
        texture{pigment {White filter 0.7} finish{specular 1}}
}

//Sphere Top
isosurface {
  function { pow(x,2) + pow(y,2) + pow(z,2) - pow(0.5,2) }
        accuracy 0.001
        threshold 0
        max_gradient 4
        texture{pigment {White filter 0.7} finish{specular 1}}
        translate <0, 0.78, 0>
}

//Sphere Bottom
isosurface {
  function { pow(x,2) + pow(y,2) + pow(z,2) - pow(0.5,2) }
        accuracy 0.001
        threshold 0
        max_gradient 4
        texture{pigment {White filter 0.7} finish{specular 1}}
        translate <0, -0.78, 0>
}

// Cylinder Top
isosurface {
  function { pow(x,2) + pow(z,2) - pow(0.5,2) }
        accuracy 0.001
        threshold 0
        max_gradient 4
        contained_by{box{<-1,0.78,-1>, <1,1,1>}}
        texture{pigment {White filter 0.7} finish{specular 1}}
}

// Cylinder Bottom
isosurface {
  function { pow(x,2) + pow(z,2) - pow(0.5,2) }
        accuracy 0.001
        threshold 0
        max_gradient 4
        contained_by{box{<-1,-0.78,-1>, <1,-1,1>}}
        texture{pigment {White filter 0.7} finish{specular 1}}
}

}

/* isosurface {
function { f_torus (x,y,z,0.385, 0.37) }
        //accuracy 0.001
        //threshold 0
        max_gradient 4
contained_by{sphere {0,0.5}}
texture{pigment {White filter 0.7} finish{specular 1}}
}  */

//torus{0.385, 0.37}
//texture{pigment {White filter 0.7} finish{specular 1}}

#declare r1=0.385;
#declare r2=0.37;

poly
{ 4,
  <1,0,0,0,2,
   0,0,2,0,-2*(r1*r1+r2*r2),
   0,0,0,0,0,
   0,0,0,0,0,
   1,0,0,2,0,
   2*(r1*r1-r2*r2),0,0,0,0,
   1,0,-2*(r1*r1+r2*r2),0,pow(r1,4)+pow(r2,4)-2*r1*r1*r2*r2>
  texture{pigment {White filter 0.7} finish{specular 1}}
}


}

[/Isosurface Code]

[Predefined Shape Code]

#include "colors.inc"

global_settings
{
  assumed_gamma 1.0
}

camera
{
  location  <0.0, .5, -4.5>
  direction 1.5*z
  right     4/3*x
  look_at   <0.0, 0.0, 0.0>
}

light_source
{
  0*x // light's position (translated below)
  color red 1.0  green 1.0  blue 1.0  // light's color
  translate <-30, 30, -30>
}

difference
{
  merge
  {
    cylinder{<0,-0.5,0>, <0,0.5,0>, 0.215}
    sphere{<0, .78, 0> 0.5}
    sphere{<0, -.78, 0> 0.5}
    cylinder{<0, .78, 0>, <0, 1, 0>, .5}
    cylinder{<0, -.78, 0>, <0, -1, 0>, .5}
  }
  torus{0.385, 0.37}
  texture{pigment {White filter 0.7} finish{specular 1}}
}

[/Predefined Shape Code]


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.